const link = require('./link')
const conn = link.conn

function add_data(data) {
	var addSql = 'INSERT INTO articledata(author_id,author_name,author_avatar,container,posttime) VALUES(?,?,?,?,?)';
	var addSqlParams = [data.author_id, data.author_name, data.author_avatar, data.container, data.posttime];
	conn.query(addSql, addSqlParams, (err, res) => {
		if (err) {
			console.log(err.message);
			return;
		}
		console.log('INSERT OK!' + res);
	})

}




module.exports = {
	add_data
}
